#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QTimer>
#include <QFile>
#include <QPixmap>
#include <QImage>
#include <QList>
#include <QStringList>
#include <QString>
#include <QSound>
#include "ui_mainwindow.h"
#include "debatesession.h"
#include "headdialog.h"
class MainWindow : public QMainWindow, public Ui::MainWindow
{
	Q_OBJECT

public:
	MainWindow(QWidget *parent=0, Qt::WindowFlags flags=0);
private:
	QImage headPic;
	QImage headOpp;
	QTimer proTimer;
	QTimer conTimer;
	QList<DebateSession> sessionList;
	QSound *warningSound;
	int currSession;
	int currSide;
	bool isTiming();
	void loadSequence();
	bool resetConf();
	void initSession(int seq);
	QString getSpeakerName(int side, int place);
private slots:
	void reduceTime1();
	void reduceTime2();
	void reset();
	void pause();
	void resume();
	void start();
	void change();
	void next();
	void timeEvent1(const QTime &time);
	void timeEvent2(const QTime &time);
	void changeHead();
signals:
	void timeUp(int);
};
#endif
